#ifndef __PROCESSOR_ARM_COMM_H_
#define __PROCESSOR_ARM_COMM_H_

#include "typedef.h"

address get_pheriphal_addr();


void increase_tick();
void gicc_init();
void gicd_init();
void gic_enable_interrupt(word id, word target);
void gic_send_ici(int id, word target, word filter);

void private_timer_init();


/**
 * @brief Set the private timer period object
 *
 * @param n must under 32 bits
 * @param m must under 8 bits
 * @note generate an int with freqency as (n/m) times reference clock
 * @note reference clock is the core pheriphal clock
 */
void set_private_timer_period(unsigned int n, unsigned char m);

void clean_private_timer_int_status();

/**
 * @brief Clear private timer interrupt
 */
void clean_pt_timer_int_status();

/**
 * @brief Get the inner-core pheriphal address.
 * 
 * @return address 
 */
address get_pheriphal_addr();

void copy_vector();

#endif //__PROCESSOR_ARM_COMM_H_